package com.css.fxfzfxqh.modules.lifelineEngineering.service.impl;

import com.css.fxfzfxqh.common.rest.JcsjRestManager;
import com.css.fxfzfxqh.common.rest.model.bo.YsxLifelineDataBo;
import com.css.fxfzfxqh.common.rest.model.param.YsxDataSourcePageParam;
import com.css.fxfzfxqh.modules.lifelineEngineering.param.PageParam;
import com.css.fxfzfxqh.modules.lifelineEngineering.repository.LifelineDataRepository;
import com.css.fxfzfxqh.modules.lifelineEngineering.service.LifelineDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;

@Service
public class LifelineDataServiceImpl implements LifelineDataService {

    @Autowired
    private LifelineDataRepository lifelineDataRepository;

    @Autowired
    private JcsjRestManager restManager;
    @Override
    public Map<String, Object> page(YsxDataSourcePageParam param) throws Exception{
        YsxLifelineDataBo dataSource = restManager.getLifelineDataSource(param);
        return dataSource.getData();
    }

    @Override
    public Map<String, Object> influenceField(PageParam param, int page, int size) {
        return lifelineDataRepository.influenceField(param, page, size);
    }
}
